package ink.charon.novel.entity;

import java.util.List;
import java.util.Map;

/*
{
  "catIdRule": {
    "0": [
      "http://book.zongheng.com/store/c0/c0/b0/u0/p{page}/v9/s9/t0/u0/i1/ALL.html;1,div[@class=pagebox];6,/[0-9]+页"
    ],
    "1": [
      "http://book.zongheng.com/store/c1/c0/b0/u0/p{page}/v9/s9/t0/u0/i1/ALL.html;1,div[@class=pagebox];6,/[0-9]+页"
    ]
  },
  "bookListRule": [
    {
      "author": "1,div[@class=bookinfo]/div[@class=bookilnk]/a/text()",
      "bookName": "1,div[@class=bookinfo]/div[@class=bookname]/a/text()",
      "cover": "1,div[@class=bookimg]/a/img;6,http://static.zongheng.com/upload/cover/[a-z0-9]+/[a-z0-9]+/[a-z0-9]+.[a-z0-9]+",
      "desc": "1,div[@class=bookinfo]/div[@class=bookintro]/text()",
      "detailUrl": "1,div[@class=bookinfo]/div[@class=bookname]/a;5",
      "divRule": "3,div[class~=bookbox]",
      "indexUrl": "",
      "lastChapter": "1,div[@class=bookinfo]/div[@class=bookupdate]/a/text()",
      "lastChapterUrl": "1,div[@class=bookinfo]/div[@class=bookupdate]/a;5",
      "monthClick": "",
      "status": "1,div[@class=bookinfo]/div[@class=bookilnk]/span[1]/text();8, -->",
      "statusRule": "0,连载中;1,已完结",
      "timePatten": "MM-dd hh:mm",
      "updateTime": "1,div[@class=bookinfo]/div[@class=bookilnk]/span[2]/text();6,[0-9]+-[0-9]+ [0-9]+:[0-9]+",
      "visitCount": "",
      "weekClick": "",
      "wordCount": ""
    }
  ],
  "bookDetailRule": {
    "author": "",
    "bookName": "",
    "commentCount": "",
    "cover": "",
    "desc": "",
    "indexUrl": "",
    "lastChapter": "",
    "lastChapterUrl": "",
    "monthClick": "",
    "score": "",
    "status": "",
    "statusRule": "",
    "timePatten": "",
    "updateTime": "",
    "visitCount": "",
    "weekClick": "",
    "wordCount": ""
  },
  "bookIndexRule": [
    {
      "isVip": "0",
      "indexName": "",
      "divRule": "",
      "contentUrl": ""
    },
    {
      "isVip": "1",
      "indexName": "",
      "divRule": "",
      "contentUrl": ""
    }
  ],
  "bookContentRule": [
    "",
    ""
  ],
  "errorPageRule": [
    "",
    ""
  ]
}
* */
public class SpiderRule {

    // 分类规则
    private Map<Integer, List<String>> catIdRule;

    // 列表页规则
    private List<Map<String, String>> bookListRule;

    private Map<String, String> bookDetailRule;

    private List<Map<String, String>> bookIndexRule;

    private List<String> bookContentRule;

    private List<String> errorPageRule;

    public Map<Integer, List<String>> getCatIdRule() {
        return catIdRule;
    }

    public void setCatIdRule(Map<Integer, List<String>> catIdRule) {
        this.catIdRule = catIdRule;
    }

    public List<Map<String, String>> getBookListRule() {
        return bookListRule;
    }

    public void setBookListRule(List<Map<String, String>> bookListRule) {
        this.bookListRule = bookListRule;
    }

    public Map<String, String> getBookDetailRule() {
        return bookDetailRule;
    }

    public void setBookDetailRule(Map<String, String> bookDetailRule) {
        this.bookDetailRule = bookDetailRule;
    }

    public List<Map<String, String>> getBookIndexRule() {
        return bookIndexRule;
    }

    public void setBookIndexRule(List<Map<String, String>> bookIndexRule) {
        this.bookIndexRule = bookIndexRule;
    }

    public List<String> getBookContentRule() {
        return bookContentRule;
    }

    public void setBookContentRule(List<String> bookContentRule) {
        this.bookContentRule = bookContentRule;
    }

    public List<String> getErrorPageRule() {
        return errorPageRule;
    }

    public void setErrorPageRule(List<String> errorPageRule) {
        this.errorPageRule = errorPageRule;
    }
}
